#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int fac(int n)
{
	if (n == 0)
	{
		return 1;
	}
	else
	{
		n = n * fac(n - 1);
	}
}
int main()
{
	int i = 0;
	while (scanf("%d", &i))
	{
		i = fac(i);
		printf("%d\n", i);
	}
	return 0;
}